iT邦幫忙

2024 iThome 鐵人賽

DAY 2
0
Software Development

Spring boot 從零到寫出ChatGPT系列 第 2

Spring boot 從零開始 (2) - Spring boot是甚麼 ?

  • 分享至 

  • xImage
  •  

今天先來讓大家認識一下Spring boot跟他的特色吧!! 明天我們就來正式啟動一個Spring boot專案 !!

Spring boot

簡介

Spring Boot是由Pivotal 團隊所開發,是基於Spring框架的開源框架,繼承Spring框架原有的優秀特性,並簡化了原本Spring需要透過地繁瑣配置才能啟動服務。

參考官方文件的說法:

Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run".
We take an opinionated view of the Spring platform and third-party libraries so you can get started with minimum fuss. Most Spring Boot applications need very little Spring configuration.

特色

  • 創建獨立的 Spring 應用程式
  • 直接嵌入Tomcat、Jetty或Undertow(無需部署WAR檔案)
  • 自動配置 : 根據你設定的dependencies自動配置Spring應用所需的各種功能,連第三方library也可以輕易引入
  • 內建許多監控、擴展等功能 (metrics / security ... 有機會後面會教大家
  • 微服務支持:簡化了微服務架構的建置

Spring 和 Spring Boot 最大差異

依賴管理:

  • Spring 需要手動管理每個依賴的版本,還要困擾到底需要引用哪個版本的依賴
  • Spring Boot 提供了spring-boot-starters,可以簡單的管理依賴的版本**(dependency version)**,確保兼容性。

Application

  • Spring 應用通常需要部署到外部的應用服務器。
  • Spring Boot 包含內嵌的應用程式伺服器,可以直接啟動執行。

看完之後,有沒有覺得要好好來認識一下Spring boot呢/images/emoticon/emoticon12.gif
希望在未來的30天可以讓自己更熟悉也邊跟大家分享文章,希望讓大家人人都有機會上手Spring boot !

最後再送上一個在官方網站上看到的一句話

Most [of our] services today are all based on Spring Boot. I think the most important thing is that [Spring] has just been very well maintained over the years...that is important for us for the long term because we don’t want to be switching to a new framework every two years.

Paul Bakker, Senior Software Engineer, Netflix

參考資料/來源


上一篇
Spring boot 從零開始 (1) - 修練初心 & 目標
下一篇
Spring boot 從零開始 (3) - Setup 開發環境
系列文
Spring boot 從零到寫出ChatGPT12
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言